package com.vne.skyemart.model;

import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

@Entity
@Table(name = "CompanyStore",catalog = "vneskyemart_db")
public class CompanyStore implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = 8995428090672327594L;
	@Id
	@Column(name = "CompanyID",nullable = false)
	private int companyID;
	
	@Column(name = "CompanyName",nullable = false,length = 50)
	private String companyName;
	
	@Column(name = "CompanyAddress",nullable = false,length = 20)
	private String companyAddress;
	
	@Column(name = "CompanyCity",nullable = false,length = 20)
	private String companyCity;
	
	@Column(name = "CompanyPhone",nullable = false,length = 20)
	private String companyPhone;
	
	@Column(name = "CompanyFax",length = 20)
	private String companyFax;
	
	@Column(name = "CompanyLogo",nullable = false,length = 250)
	private String companyLogo;
	
	@Column(name = "CompanyWebsite",length = 20)
	private String companyWebsite;
	
	@OneToMany(fetch = FetchType.LAZY,mappedBy = "companyStore")
	private Set<Store> store = new HashSet<Store>(0);
	
	/**
	 * CONSTRUCTOR
	 */
	public CompanyStore() {}

	public CompanyStore(int companyID, String companyName,
			String companyAddress, String companyCity, String companyPhone,
			String companyFax, String companyLogo, String companyWebsite) {
		super();
		this.companyID = companyID;
		this.companyName = companyName;
		this.companyAddress = companyAddress;
		this.companyCity = companyCity;
		this.companyPhone = companyPhone;
		this.companyFax = companyFax;
		this.companyLogo = companyLogo;
		this.companyWebsite = companyWebsite;
	}
	/**
	 * GETTER AND SETTER
	 * 
	 */
	
	public int getCompanyID() {
		return companyID;
	}

	public void setCompanyID(int companyID) {
		this.companyID = companyID;
	}

	public String getCompanyName() {
		return companyName;
	}

	public void setCompanyName(String companyName) {
		this.companyName = companyName;
	}

	public String getCompanyAddress() {
		return companyAddress;
	}

	public void setCompanyAddress(String companyAddress) {
		this.companyAddress = companyAddress;
	}

	public String getCompanyCity() {
		return companyCity;
	}

	public void setCompanyCity(String companyCity) {
		this.companyCity = companyCity;
	}

	public String getCompanyPhone() {
		return companyPhone;
	}

	public void setCompanyPhone(String companyPhone) {
		this.companyPhone = companyPhone;
	}

	public String getCompanyFax() {
		return companyFax;
	}

	public void setCompanyFax(String companyFax) {
		this.companyFax = companyFax;
	}

	public String getCompanyLogo() {
		return companyLogo;
	}

	public void setCompanyLogo(String companyLogo) {
		this.companyLogo = companyLogo;
	}

	public String getCompanyWebsite() {
		return companyWebsite;
	}

	public void setCompanyWebsite(String companyWebsite) {
		this.companyWebsite = companyWebsite;
	}

	public static long getSerialversionuid() {
		return serialVersionUID;
	}

	public Set<Store> getStore() {
		return store;
	}

	public void setStore(Set<Store> store) {
		this.store = store;
	}
}
